import axios from "@/utils/req"
// 登录
export const logine = async (data) => {
    return await axios.post("/sys/login", data)
}
// 权限-获取列表
export const getPermission = () => {
    return axios.get("/sys/permission")
}
// 权限-添加
export const addPermission = (data) => {
    return axios.post("/sys/permission", data)
}
// 权限-删除
export const delPermission = (id) => {
    return axios.delete(`/sys/permission/${id}`)
}
// 权限-修改    
export const updatePermission = (id,data) => {
    return axios.put(`/sys/permission/${id}`, data)
}
// 权限-获取详情
export const getPermissionDetail = (id) => {
    return axios.get(`/sys/permission/${id}`)
}
// 获取部门列表
export const getDepartment = () => {
    return axios.get("/company/department")
}
// 查询考勤数据列表
export const getAttendanceList = (data) => {
    return axios.get("/attendances", {params:data})
}
// 获取月度考勤数据
export const getAttendanceMonth = (data) => {
    return axios.get("/attendances/reports", {params:data})
}

